package com.dji.sample.media.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class MediaQueryDTO {

    @JsonProperty("droneSn")
    private String droneSn;

    @JsonProperty("timeStart")
    private Long timeStart;

    @JsonProperty("timeEnd")
    private Long timeEnd;

    @JsonProperty("waylineId")
    private String waylineId;

    @JsonProperty("page")
    private long page = 1;
    
    @JsonProperty("pageSize")
    private long pageSize = 10;

    public boolean hasConditions(){
        //检查值是否为空
        return (droneSn != null && !droneSn.isEmpty()) || 
               timeStart != null || 
               timeEnd != null || 
               (waylineId != null && !waylineId.isEmpty());
    }
}
